package com.yewen.constants;

/**
 * @Description 服务异常枚举类
 * @Author Taovh
 * @Date 2022/3/26 19:41
 **/
public enum ServiceExceptionEnum {
    NOT_LOGIN(20000,"用户尚未登陆"),
    USER_EXISTED(40000,"用户名已经存在"),
    TEL_EXISTED(41000,"手机号已经存在"),
    EMAIL_EXISTED(42000,"邮箱已经存在"),
    ID_OR_PASSWORD_WRONG(50000,"用户名或密码错误"),
    SERVER_BUSY(80000,"服务器繁忙"),
    GEN_TOKEN_FAIL(81000,"Token生成失败"),
    UNKNOWN_ERROR(90000,"未知错误"),
    ;
    /*
    * 错误码
    * */
    private int code;

    /*
    * 错误提示
    * */
    private String message;
    ServiceExceptionEnum(int code,String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
